package com.yiwan.app.preventionsis.config;

import android.content.Context;
import com.app.tianwan.tianwanframe.utils.CrashHandler;
import com.app.tianwan.tianwanframe.utils.LogUtil;
import com.umeng.message.PushAgent;

/**
 * 全局配置
 */
public class GlobalCfg {
    public static final boolean DEBUG_MODE = true;

    public static final String RES_FOLDER = "res";

    public static final String VERSION_DAT = "version.dat";

    public static final String FOLER_IMG_INTRO = "intro";
    public static final String IMG_CONFIG_INTRO = "intro_config.json";
    public static final String FOLER_IMG_CHEAT = "cheat";
    public static final String IMG_CONFIG_CHEAT = "cheat_config.json";
    public static final String FOLER_IMG_FIRE = "fire";
    public static final String IMG_CONFIG_FIRE = "fire_config.json";
    public static final String FOLER_IMG_ROB = "rob";
    public static final String IMG_CONFIG_ROB = "rob_config.json";
    public static final String FOLER_IMG_STEAL = "steal";
    public static final String IMG_CONFIG_STEAL = "steal_config.json";
    public static final String FOLER_IMG_TERROR = "terror";
    public static final String IMG_CONFIG_TERROR = "terror_config.json";
    public static final String FOLER_IMG_SELFSAVE = "selfsave";
    public static final String IMG_CONFIG_SELFSAVE = "selfsave_config.json";

    public static final String[] FOLDERS = {FOLER_IMG_INTRO, FOLER_IMG_CHEAT, FOLER_IMG_FIRE, FOLER_IMG_ROB, FOLER_IMG_STEAL, FOLER_IMG_SELFSAVE, FOLER_IMG_TERROR};

    public static final int IMG_TYPE_INTRO = 0;
    public static final int IMG_TYPE_CHEAT = 1;
    public static final int IMG_TYPE_FIRE = 2;
    public static final int IMG_TYPE_ROB = 3;
    public static final int IMG_TYPE_STEAL = 4;
    public static final int IMG_TYPE_SAVE_SELF = 5;
    public static final int IMG_TYPE_TERROR = 6;

    public static void initConfig(Context context){
        PushAgent pushAgent = PushAgent.getInstance(context);
        pushAgent.setDebugMode(DEBUG_MODE);
        LogUtil.TOTAL_LEVEL = DEBUG_MODE ? 1 : 5;
        CrashHandler.SAVE_CRASH_LOG = DEBUG_MODE;
    }
}
